package com.shopping.service.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
@ConfigurationProperties(prefix = "application")
public class ApplicationConfig {

    /**
     * token在http Request Header的key
     */
    private String tokenHeadKey;
    /**
     * 令牌签名key
     */
    private String tokenSignKey;
    /**
     * token令牌过期时间
     */
    private Long expiration;

    /**
     * session用户数据存储在redis的时间,单位秒  86400秒 = 24小时
     */
    private int sessionExpirationSeconds = 86400;

    /**
     * token在过期之前,但是已经需要被刷新时,response返回的header信息的key
     */
    private String refreshedTokenHeaderKey;
}
